<?php
/**
 *
 * _kittens_view.php
 * @author Artem Azarov <bel-azar@ya.ru>
 * Date: 6/26/12
 * Time: 1:09 AM
 *
 */
?>
<div class="row">

    <table>
        <tbody>
        <tr>
            <td colspan="3" ><?php Yii::t('cat', 'Born at')?> <span><?php echo $data['birthday']; ?></span></td>
        </tr>
        <tr>
            <td>
                <div class="kitten_image">
                    <?php
                    echo CHtml::image(Yii::app()->baseUrl.'/images/avatars/'
                        .$data['father_id'], $data['father_name'], array('height'=>300));
                    ?>
                </div>
            </td>
            <td><div class="heart_wrapper"><div class="heart"></div></div></td>
            <td>
                <div class="kitten_image">
                    <?php
                    echo CHtml::image(Yii::app()->baseUrl.'/images/avatars/'
                        .$data['mother_id'], $data['mother_name'], array('height'=>300));
                    ?>
                </div>
            </td>
        </tr>
        <tr>
            <td width="50%">&nbsp;<?php echo $data['father_name'];?> <br>
                <?php echo CHtml::link(Yii::t('main', 'Genealogy'), array('genealogy/tree', 'id' => $data['father_id'])); ?>
            </td>
            <td>&nbsp;<?php echo $data['mother_name'];?> <br>
                <?php echo CHtml::link(Yii::t('main', 'Genealogy'), array('genealogy/tree', 'id' => $data['mother_id'])); ?>
            </td>
        </tr>
        </tbody>
    </table>


    <br />
    <?php if (!empty($data['kittens'])): ?>
        <table class="kittens_list">
            <?php foreach ($data['kittens'] as $kitten) :?>
            <tr><td colspan="4"><hr /></td></tr>
            <tr>
                <td><?php echo CHtml::image(Yii::app()->baseUrl.'/images/avatars/'
                    .$kitten->cat_id, $kitten->name, array('height'=>50)); ?></td>
                <td><?php echo $kitten->sex; ?></td>
                <td><?php echo $kitten->color; ?></td>
                <td>free<?php //echo $kitten->status; ?></td>
            </tr>
            <?php endforeach ?>
        </table>
    <?php endif ?>
</div>